<?
global $frm, $userinfo, $dbconn;
if($frm ['a'] != 'getdata'){
	include 'inc/header.inc';
}
if ($frm ['a'] == 'search') {
	include 'inc/search.inc';
} else if ($frm ['a'] == 'view_statistics') {
	include 'inc/view_statistics.inc';
} else if ($frm ['a'] == 'login' && $userinfo ['logged'] != 1) {
	include 'inc/login.inc';
} else if ($frm ['a'] == 'logout') {
	$smarty->assign ( 'redir', $_SERVER ["HTTP_REFERER"] );
	header ( "Refresh: 5; url=?a=login" );
	$smarty->display ( 'logout.tpl' );
	exit ();
} else if ($frm ['a'] == 'register' && $userinfo ['logged'] != 1) {
	include 'inc/register.inc';
} else if ($frm ['a'] == 'accountmain' && $userinfo ['logged'] == 1) {
	include 'inc/accmain.inc';
} else if ($frm ['a'] == 'editprofile' && $userinfo ['logged'] == 1) {
	include 'inc/editprofile.inc';
} else if ($frm ['a'] == 'myhyips' && $userinfo ['logged'] == 1) {
	include 'inc/myhyips.inc';
} else if ($frm ['a'] == 'bookmarks') {
	include 'inc/bookmarks.inc';
} else if ($frm ['a'] == 'remindpassword' && $userinfo ['logged'] != 1) {
	include 'inc/remind.inc';
} else if ($frm ['a'] == 'details') {
	include 'inc/details.inc';
} else if ($frm ['a'] == 'add_vote') {
	include 'inc/add_vote.inc';
} else if ($frm ['a'] == 'new') {
	include 'inc/new.inc';
} else if ($frm ['a'] == 'add') {
	include 'inc/add.inc';
} else if ($frm ['a'] == 'add_banner') {
	include 'inc/errors/UnConstructionSite.inc';
} else if ($frm ['a'] == 'news') {
	include 'inc/news.inc';
} else if ($frm ['a'] == 'getdata') {
	include 'inc/do_getdata.inc';
} else if ($frm ['a'] == 'egold_processing') {
	include 'inc/egold_processing.inc';
} else if ($frm ['a'] == 'lr_processing') {
	include 'inc/lr_processing.inc';
} else if ($frm ['a'] == 'eb_processing') {
	include 'inc/eb_processing.inc';
} else if ($frm ['a'] == 'support') {
	include 'inc/support.inc';
} else if ($frm ['a'] == 'report_scam') {
	include 'inc/report_scam.inc';
} else if ($frm ['a'] == 'maillist') {
	include 'inc/maillist.inc';
} else if ($frm ['a'] == 'links') {
	include 'inc/links.inc';
} else if ($frm ['a'] == 'partners') {
	$smarty->display ( 'partners.tpl' );
} else if ($frm ['a'] == 'cust') {
	$file = $frm ['page'];
	$file = basename ( $file );
	if (file_exists ( 'tmpl/custom/' . $file . '.tpl' )) {
		$smarty->display ( 'custom/' . $file . '.tpl' );
		db_close ( $dbconn );
		exit ();
	}
} else if ($frm ['a'] == 'add_program') {
	include 'inc/adv/AddProgram.inc';
} else if ($frm ['a'] == 'error') {
	include 'inc/error.inc';
}else if($frm ['a'] == 'blog'){
	include 'inc/errors/UnConstructionSite.inc';
} else {
	include 'inc/home.inc';
}
if($frm ['a'] != 'getdata'){
	include 'inc/footer.inc';
}
?>
